#include "head.h"

//计算一个文件的哈希值
//参数：文件名，存储哈希值的字符数组，数组长度
int hash_count(const char *file_name, char *hash_value, int lenth){
    bzero(hash_value, lenth);
    char str[100] = "sha1sum ";
    strcat(str, file_name);
    FILE *pipe = popen(str, "r");

    fread(hash_value, 1, 40, pipe);

    pclose(pipe);
    return 0;
}

